/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Entidad;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;

/**
 *
 * @author pc
 */
@Embeddable
public class SeatcinemaPK implements Serializable {
    @Basic(optional = false)
    @NotNull
    @Column(name = "cinemaID")
    private int cinemaID;
    @Basic(optional = false)
    @NotNull
    @Column(name = "seatID")
    private int seatID;

    public SeatcinemaPK() {
    }

    public SeatcinemaPK(int cinemaID, int seatID) {
        this.cinemaID = cinemaID;
        this.seatID = seatID;
    }

    public int getCinemaID() {
        return cinemaID;
    }

    public void setCinemaID(int cinemaID) {
        this.cinemaID = cinemaID;
    }

    public int getSeatID() {
        return seatID;
    }

    public void setSeatID(int seatID) {
        this.seatID = seatID;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) cinemaID;
        hash += (int) seatID;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof SeatcinemaPK)) {
            return false;
        }
        SeatcinemaPK other = (SeatcinemaPK) object;
        if (this.cinemaID != other.cinemaID) {
            return false;
        }
        if (this.seatID != other.seatID) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Entidad.SeatcinemaPK[ cinemaID=" + cinemaID + ", seatID=" + seatID + " ]";
    }
    
}
